<!--
 * @Author: your name
 * @Date: 2020-08-12 14:57:13
 * @LastEditTime: 2020-08-13 14:13:54
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \devopsh:\project\QMangolia-web\src\views\code\verify\defect.vue
-->
<template>
  <div>
    <q-table :data="data" :columns="columns" :option="option"></q-table>
  </div>
</template>

<script>
export default {
  components: {
    QTable: () => import('@/components/QTable')
  },
  data() {
    return {
      data: [{
        sn: '9000001',
        title: '获取信号塔高度',
        iteration: 'diedai1',
        state: 'zhuangtai1',
        createUser: 'liuyi',
        executor: 'zhangsan',
        priority: 'youxian2'
      }, {
        sn: '9000002',
        title: '获取信号塔高度',
        iteration: 'diedai1',
        state: 'zhuangtai1',
        createUser: 'liuyi',
        executor: 'lisi',
        priority: 'youxian1'
      }, {
        sn: '9000003',
        title: '获取信号塔高度',
        iteration: 'diedai2',
        state: 'zhuangtai1',
        createUser: 'liuyi',
        executor: 'wangwu',
        priority: 'youxian2'
      }, {
        sn: '9000004',
        title: '获取信号塔高度',
        iteration: 'diedai3',
        state: 'zhuangtai1',
        createUser: 'liuyi',
        executor: 'zhaoliu',
        priority: 'youxian3'
      }, {
        sn: '9000005',
        title: '获取信号塔高度',
        iteration: 'diedai2',
        state: 'zhuangtai1',
        createUser: 'liuyi',
        executor: 'sunqi',
        priority: 'youxian3'
      }, {
        sn: '9000006',
        title: '获取信号塔高度',
        iteration: 'diedai1',
        state: 'zhuangtai1',
        createUser: 'liuyi',
        executor: 'zhouba',
        priority: 'youxian1'
      }],
      currentPage: 4,
      userList: [{
        id: 'liuyi',
        name: '刘一',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'chener',
        name: '陈二',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'zhangsan',
        name: '张三',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'lisi',
        name: '李四',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'wangwu',
        name: '王五',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'zhaoliu',
        name: '赵六',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'sunqi',
        name: '孙七',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'zhouba',
        name: '周八',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'wujiu',
        name: '吴九',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }, {
        id: 'zhengshi',
        name: '郑十',
        avatar: 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1019725746,2053024139&fm=26&gp=0.jpg'
      }],
      columns: [{
        prop: 'sn',
        label: '编号'
      }, {
        prop: 'title',
        label: '标题'
      }, {
        prop: 'iteration',
        label: '迭代',
        type: 'select',
        disabled: true,
        options: [{
          label: '迭代一',
          value: 'diedai1'
        }, {
          label: '迭代二',
          value: 'diedai2'
        }, {
          label: '迭代三',
          value: 'diedai3'
        }]
      }, {
        prop: 'state',
        label: '状态',
        type: 'dropdown',
        disabled: true,
        options: [{
          label: '待处理',
          value: 'zhuangtai1',
          style: {
            color: '#820014',
            backgroundColor: '#FFE8E6'
          }
        }, {
          label: '研发中',
          value: 'zhuangtai2',
          style: {
            color: '#614700',
            backgroundColor: '#FFF8BD'
          }
        }, {
          label: '测试中',
          value: 'zhuangtai3',
          style: {
            color: '#003A8C',
            backgroundColor: '#D4EEFC'
          }
        }, {
          label: '待验收',
          value: 'zhuangtai4',
          style: {
            color: '#061178',
            backgroundColor: '#DEE8FC'
          }
        }, {
          label: '已完成',
          value: 'zhuangtai5',
          style: {
            color: '#135200',
            backgroundColor: '#E4F7D2'
          }
        }, {
          label: '已关闭',
          value: 'zhuangtai6',
          style: {
            color: '#595959',
            backgroundColor: '#E9E9E9'
          }
        }]
      }, {
        prop: 'createUser',
        label: '创建',
        type: 'user',
        disabled: false
      }, {
        prop: 'executor',
        label: '指派',
        type: 'user',
        disabled: false
      }, {
        prop: 'priority',
        label: '优先级',
        type: 'dropdown',
        disabled: true,
        options: [{
          label: '非常紧急',
          value: 'youxian1',
          style: {
            color: '#820014',
            backgroundColor: '#FFE8E6'
          }
        }, {
          label: '较高',
          value: 'youxian2',
          style: {
            color: '#614700',
            backgroundColor: '#FFF8BD'
          }
        }, {
          label: '普通',
          value: 'youxian3',
          style: {
            color: '#003A8C',
            backgroundColor: '#D4EEFC'
          }
        }, {
          label: '较低',
          value: 'youxian4',
          style: {
            color: '#135200',
            backgroundColor: '#E4F7D2'
          }
        }]
      }],
      option: {
        pageination: {
          layout: 'total, sizes, prev, pager, next, jumper',
          pageSizes: [10, 15, 20, 25, 30]
        }
      }
    }
  }
}
</script>